/*
 * List.hpp
 *
 *  Created on: 05/12/2011
 *      Author: marcio
 */

#ifndef LIST_HPP_
#define LIST_HPP_

template<typename T>
class List<T> {
protected:
	class Node{
		T elem;
		Node* next;
	};
private:
	Node* head;
	Node* last;
public:
	List();

	bool addFirst(T elem);

	bool addLast(T elem);

	T getElemFirst();

	T getElemLast();

	bool removeElemFirst();

	bool removeElemLast();

	bool iterateModify( void* (*function)(T*));

	List* iterate(void* (*function)(T*));

	bool order( int (*function)(T*, T*));

	bool isEmpty();

	virtual ~List();
};

#endif /* LIST_HPP_ */
